import request from '@/utils/request'

// 查询作业情况列表
export function listAss(query) {
  return request({
    url: '/stuinfo/ass/list',
    method: 'get',
    params: query
  })
}

// 查询作业情况详细
export function getAss(submissionId) {
  return request({
    url: '/stuinfo/ass/' + submissionId,
    method: 'get'
  })
}

// 新增作业情况
export function addAss(data) {
  return request({
    url: '/stuinfo/ass',
    method: 'post',
    data: data
  })
}

// 修改作业情况
export function updateAss(data) {
  return request({
    url: '/stuinfo/ass',
    method: 'put',
    data: data
  })
}

// 删除作业情况
export function delAss(submissionId) {
  return request({
    url: '/stuinfo/ass/' + submissionId,
    method: 'delete'
  })
}

export function getHomeworkStats() {
  return request({
    url: '/stuinfo/ass/stats',
    method: 'get'
  })
}